package com.example.mq2.mqserver.mapper;

import com.example.mq2.mqserver.core.Binding;
import com.example.mq2.mqserver.core.Exchange;
import com.example.mq2.mqserver.core.MSGQueue;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface MqMapper {

    //建库建表
    void createExchangeTable();
    void createQueueTable();
    void createBindingTable();

    //针对上述三个数据库进行增删查操作
    void insertExchange(Exchange exchange);
    void deleteExchange(@Param("exchangeName") String exchangeName);
    List<Exchange> selectExchangeAll();
    void insertQueue(MSGQueue queue);
    void deleteQueue(@Param("queueName") String queueName);
    List<MSGQueue> selectQueueAll();
    void insertBinding(Binding binding);
    void deleteBinding(Binding binding);
    List<Binding> selectBindingAll();



}
